<?php

namespace App\Http\Requests\Admin\v1;

use Illuminate\Foundation\Http\FormRequest;
use App\Http\Requests\ApiRequest;

class ChargingSchemeRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'prices.face.detectface'        => 'required|numeric',
            'prices.face.emotion'           => 'required|numeric',
            'prices.face.landmarks'         => 'required|numeric',
            'prices.face.agegender'         => 'required|numeric',
            'prices.face.texture_swap_3d'   => 'required|numeric',
            'prices.face.generate_3d_model' => 'required|numeric',
            'prices.face.compare'           => 'required|numeric',
            'prices.face.aging'             => 'required|numeric',
            'prices.face.swapface'          => 'required|numeric',
            'prices.face.hairsegement'      => 'required|numeric',
            'prices.face.haircolor'         => 'required|numeric',
            'prices.face.makeupswap'        => 'required|numeric',
            'type'                          => 'required|string',
            'remark'                        => 'required|string',
            'start_time'                    => 'required_with:end_time',
            'end_time'                      => 'required_with:start_time',
        ];
    }
}
